<template>
  <div style="width: 100%;min-height: 100vh;min-width: 1000px">
    <div style="width: 100%;max-width: 1940px;position: relative;margin: 0 auto"
         :style="{
          paddingLeft:(data.leftStatus==0)?data.leftWidth:'0'
        }"
    >

      <div style="padding: 40px 44px;height: 100vh;position: absolute;top: 0;left: 0;display: inline-block;color: var(--color-neutral-10);padding-right: 20px;width: 400px;"
           :style="{
              top:homeData.subPage.scrollTop.toString() + 'px'
           }"
      >
        <div style="width: 100%;height: calc(100% - 60px);border-radius: 10px;border: 1px solid var(--color-neutral-3);position: relative;overflow-y: hidden;position: relative;z-index: 1000;backdrop-filter: blur(10px);transition-property: background-color,height;transition-duration: .3s;transition-timing-function: cubic-bezier(0.23, 1, 0.320, 1)"
          :style="{
            backgroundColor:data.leftWidth=='0'?appData.theme.translucentBackground:appData.theme.background,
            boxShadow:data.leftWidth=='0'?'0 4px 10px rgba(0,0,0,0.1)':'0 1px 3px rgba(0,0,0,0.1)',
            height:(data.leftFold && data.leftWidth=='0')?'50px':'calc(100% - 60px)'
          }"
        >
          <div style="width: 100%;height: 48px;padding:20px 20px;position: relative"
            :style="{
              padding:data.leftStatus==0?'10px 15px':'20px 20px'
            }"
          >
            <span :class="data.leftPageId==0?['link-selected']:['link']" @click="()=>{
              data.leftPageId=0;changeRightPage(0);rsps();

            } ">选志愿</span>
            <span :class="data.leftPageId==1?['link-selected']:['link']" @click="()=>{
              data.leftPageId=1;changeRightPage(1);rsps();
              if(data.rightPage.applicationForm.list==undefined){
                data.leftFold = false
              }
            }  ">我的志愿表</span>
            <button v-if="data.leftWidth=='0'" @click="()=>{
              data.leftFold = !data.leftFold
            }" style="border: 0 !important;padding: 0 0;padding-left: 5px;padding-top: 5px;transform: translateY(2px);position: absolute;right: 15px;top: 9px">
              <svg v-if="!data.leftFold" width="18" height="18" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M24 15.444L7.737 31.707a1 1 0 01-1.415 0l-1.414-1.414a1 1 0 010-1.414L22.586 11.2a2 2 0 012.828 0l17.678 17.678a1 1 0 010 1.414l-1.414 1.414a1 1 0 01-1.414 0L24 15.444z" fill="currentColor"/></svg>
              <svg v-if="data.leftFold" width="18" height="18" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M24 31.728l16.264-16.264a1 1 0 011.414 0l1.414 1.415a1 1 0 010 1.414L25.414 35.97a2 2 0 01-2.828 0L4.908 18.293a1 1 0 010-1.414l1.414-1.415a1 1 0 011.415 0L24 31.728z" fill="currentColor"/></svg>
              <span style="margin-left: 5px;position: relative;top: -3.5px;margin-right: 8px">{{ data.leftFold?'展开':'折叠' }}</span>
            </button>
          </div>
          <div
              :style="{
                height:data.leftPageId==0?'calc(100% - 170px)':'calc(100% - 48px)'
              }"
              style="width: 100%;padding: 20px 20px;overflow-y: auto;padding-top: 10px">

            <div v-if="data.leftPageId==0">

              <div v-if="homeData.loginedUserInfo!=undefined" style="padding: 10px 13px;border-radius: 10px;background-color: var(--color-neutral-2);line-height: 25px;margin-top: 10px">
                <p style="font-weight: bold">考生信息</p>
                <p style="display: inline-block;width: 50%">姓名：{{homeData.loginedUserInfo.name}}</p>
                <p style="display: inline-block;width: 50%">省份：{{homeData.loginedUserInfo.province}}</p>
                <p style="display: inline-block;width: 50%">分数：{{homeData.loginedUserInfo.score}}</p>
                <p style="display: inline-block;width: 50%">位次：{{homeData.loginedUserInfo.ranks}}</p>
                <p style="display: inline-block;width: 50%">科目：{{homeData.loginedUserInfo.subjectType}}</p>
              </div>

              <div v-if="homeData.loginedUserInfo!=undefined && homeData.loginedUserInfo.isVIP==0" style="margin-top: 10px;border-radius: 10px;padding: 10px 10px;padding-left: 13px;background-color: rgba(255,0,0,0.05);">
                <p style="font-weight: bold">提示</p>
                <p>激活VIP即可查看根据您的分数选出的冲、稳、保三种类型的志愿，以及每个志愿的录取概率。</p>
              </div>

              <div style="margin-top: 10px">
                <div style="color: var(--color-neutral-10);">
                  <span>院校名称</span>
                  <input v-model="data.form.universityName" style="width: 100%;border: 1px solid var(--color-neutral-4);border-bottom: 1px solid var(--color-neutral-6);border-radius: 5px;  height: 35px;margin-top: 5px;padding-left: 10px;color: var(--color-neutral-10)" placeholder="不限" />
                </div>
                <div style="color: var(--color-neutral-10);margin-top:10px">
                  <span >专业名称{{ data.form.inputMajorName!=''?'（点击回车添加）':'' }}</span>
                  <input @keydown="(e)=>{
                    if(e.code=='Enter'){
                      this.data.form.majorName.push(this.data.form.inputMajorName)
                      this.data.form.inputMajorName = ''
                    }
                  }" v-model="data.form.inputMajorName" style="width: 100%;border: 1px solid var(--color-neutral-4);border-bottom: 1px solid var(--color-neutral-6);border-radius: 5px;  height: 35px;margin-top: 5px;padding-left: 10px;color: var(--color-neutral-10);" :placeholder="data.form.majorName.length==0?'不限':('已输入' + data.form.majorName.length.toString() + '个')" />
                  <div v-if="data.form.majorName.length!=0" style="margin-top: 13px">
                    <span @click="()=>{
                    let re = []
                    for(let i=0;i<data.form.majorName.length;i++){
                      if(i==index)continue
                      re.push(data.form.majorName[i])
                    }
                    data.form.majorName = re
                  }" v-for="(item,index) in data.form.majorName" style="padding: 5px 5px;border-radius: 3px;background-color: var(--color-neutral-2);color: var(--color-neutral-10);margin-right: 5px;">{{ item }}</span>
                  </div>
                </div>

                <div v-if="data.formData.provinces.length!=0" style="margin-top: 10px;color: var(--color-neutral-10);">
                  <span>省份</span>
                  <div style="width: 100%;padding-top: 5px;line-height: 25px">
                    <a-checkbox-group v-model="data.form.provinces">
                      <a-checkbox style="width: 47%;display: inline-block;margin-right: 0" v-for="item in data.formData.provinces" :value="item">{{ item }}</a-checkbox>
                    </a-checkbox-group>
                  </div>
                </div>

                <div style="margin-top: 10px;color: var(--color-neutral-10);">
                  <span>批次</span>
                  <select v-model="data.form.batch" :disabled="data.searching" style="width: 100%;border: 1px solid var(--color-neutral-4);border-bottom: 1px solid var(--color-neutral-6);border-radius: 5px;  height: 35px;margin-top: 5px;padding-left: 10px;color: var(--color-neutral-10)"
                            :style="{
                      backgroundColor:appData.theme.background
                    }"
                  >
                    <option v-for="item in ['本科','专科']" :value="item">{{ item }}</option>
                  </select>
                </div>

                <div style="color: var(--color-neutral-10);margin-top: 10px">
                  <span>学费最大值</span>
                  <input type="number" v-model="data.form.moneyMax" style="width: 100%;border: 1px solid var(--color-neutral-4);border-bottom: 1px solid var(--color-neutral-6);border-radius: 5px;  height: 35px;margin-top: 5px;padding-left: 10px;color: var(--color-neutral-10);padding-right: 9px" placeholder="不限" />
                </div>

                <div v-if="homeData.loginedUserInfo!=undefined && homeData.loginedUserInfo.isVIP!=0" style="margin-top: 10px">
                  <div style="color: var(--color-neutral-10);margin-top: 0px;width: calc(50% - 5px);display: inline-block;margin-right: 10px">
                    <span>分数上升</span>
                    <input type="number" v-model="data.form.scoreUp" style="width: 100%;border: 1px solid var(--color-neutral-4);border-bottom: 1px solid var(--color-neutral-6);border-radius: 5px;  height: 35px;margin-top: 5px;padding-left: 10px;color: var(--color-neutral-10);padding-right: 9px" placeholder="不限" />
                  </div>

                  <div style="color: var(--color-neutral-10);margin-top: 0px;width: calc(50% - 5px);display: inline-block">
                    <span>分数下降</span>
                    <input type="number" v-model="data.form.scoreDown" style="width: 100%;border: 1px solid var(--color-neutral-4);border-bottom: 1px solid var(--color-neutral-6);border-radius: 5px;  height: 35px;margin-top: 5px;padding-left: 10px;color: var(--color-neutral-10);padding-right: 9px" placeholder="不限" />
                  </div>
                </div>

                <div style="margin-top: 10px">
                  <span>特色（{{characteristicChanged()}}）</span><br>
                  <div style="display: inline-block;width: 50%;margin-top: 10px">
                    <span style="line-height: 24px;margin-right: 10px">985</span>
                    <a-switch v-model="data.form.characteristic[0]" />
                  </div>
                  <div style="display: inline-block;width: 50%;margin-top: 10px">
                    <span style="line-height: 24px;margin-right: 10px">211</span>
                    <a-switch v-model="data.form.characteristic[1]" />
                  </div>
                  <div style="display: inline-block;width: 50%;margin-top: 10px">
                    <span style="line-height: 24px;margin-right: 10px">双一流</span>
                    <a-switch v-model="data.form.characteristic[2]" />
                  </div>
                  <div style="display: inline-block;width: 50%;margin-top: 10px">
                    <span style="line-height: 24px;margin-right: 10px">强基计划</span>
                    <a-switch v-model="data.form.characteristic[3]" />
                  </div>

                </div>

              </div>

            </div>

            <div v-if="data.leftPageId==1">
              <p v-if="data.applicationForm.list==undefined">正在获取，请稍后...</p>
              <p v-if="data.applicationForm.list!=undefined && data.applicationForm.list.length==0">没有志愿表</p>
              <div v-if="data.applicationForm.list!=undefined">
                <button :style="{
                  backgroundColor:item.name==data.applicationForm.currentFormName?'rgba(128,128,128,0.1) !important':'unset'
                }" v-for="item in data.applicationForm.list" style="margin: 0 0;margin-bottom: 10px;width: 100%;border: 0 !important;margin-bottom: 5px;text-align: left;padding-left: 10px;border-radius: 5px;position: relative"
                  @click="async ()=>{
                    if(homeData.showLoading)return
                    controlLoading(1)
                    data.leftFold = true
                    let re = await tool.axiosPostWithCheckStatus(config.serverURL,'/applicationForm/list',{
                      token:homeData.token,
                      userMark:homeData.loginedUserInfo.mark,
                      formName:item.name
                    })
                    data.rightPage.applicationForm.list = re.results
                    data.applicationForm.currentFormName = item.name
                    controlLoading(0)
                  }"
                >{{ item.name }}
                <div v-if="item.name==data.applicationForm.currentFormName" style="height: 100%;width: 3px;position: absolute;left: 0;top: 0;transform: translateY(50%)">
                  <div style="width: 100%;height: 15px;border-radius: 10px;background-color: rgb(0,120,215);transform: translateY(-50%)">

                  </div>
                </div>
                </button>
              </div>
            </div>

          </div>
          <div style="margin-top: 20px;padding-left: 20px;padding-right: 20px" v-if="data.leftPageId==0">
            <button style="width:calc(50% - 5px);margin-right: 10px;" @click="()=>{
              data.form = {
                universityName:'',
                majorName:[],
                inputMajorName:'',
                provinces:[],
                majorRemarks:'不限',
                batch:'本科',
                moneyMax:0,
                scoreDown:30,
                scoreUp:20,
                characteristic:[false,false,false,false]
              }
              data.rightPage.selectVolunteer.page = 1
              getVolunteer()
            }" :disabled="data.rightPage.selectVolunteer.getting">重置</button>
            <button style="width:calc(50% - 5px)" @click="()=>{
              data.rightPage.selectVolunteer.page = 1
              getVolunteer()
            }" :disabled="data.rightPage.selectVolunteer.getting">搜索</button>
            <button :disabled="data.rightPage.selectVolunteer.getting" style="width: 100%;margin-top: 10px;" @click="async ()=>{
              if(homeData.loginedUserInfo.isVIP==0){
                  controlWarningForm(true,'提示','尊敬的考生，您尚未开通VIP服务，因此目前无法使用一键智能填报功能、查看冲稳保志愿以及查看每个志愿被录取的概率。为了使用一键智能填报功能，请购买VIP卡或体验卡。如果你已有VIP卡，请点击下方按钮打开用户中心，输入VIP卡上的序列号以激活您的VIP服务。如果您已有体验卡，请在下面输入体验卡上的序列号，并点击确定按钮，即可立刻生成志愿表。',async ()=>{
                    if(data.warningForm.input==''){
                      controlWarningForm(true,'提示','无法生成志愿表，原因：未输入体验卡序列号。',async ()=>{},false)
                    }else{
                      let re = await tool.axiosPostWithCheckStatus(config.serverURL,'/applicationForm/activeExpCard',{
                        token:homeData.token,
                        key:data.warningForm.input,
                        mark:homeData.loginedUserInfo.mark
                      })
                      if(re.status==0){
                        controlWarningForm(true,'提示','无法生成志愿表，原因：' + re.content + '。',async ()=>{},false)
                      }else{
                        await getVolunteer(true)
                        controlWarningForm(true,'提示','系统已生成志愿表，是否立刻查看？',()=>{
                          data.leftPageId=1;changeRightPage(1);rsps();
                          if(data.rightPage.applicationForm.list==undefined){
                            data.leftFold = false
                          }
                        },true,'取消','立刻查看')
                      }
                    }
                    return
                  },true,'取消','确定',true)
                  return
                }
              await getVolunteer(true)
              controlWarningForm(true,'提示','系统已生成志愿表，是否立刻查看？',()=>{

                data.leftPageId=1;changeRightPage(1);rsps();
                if(data.rightPage.applicationForm.list==undefined){
                  data.leftFold = false
                }
              },true,'取消','立刻查看')
            }">一键智能填报</button>
          </div>
        </div>
      </div>


      <div style="width: 100%;padding: 40px 44px;color: var(--color-neutral-10);transition-property: opacity,transform;transition-timing-function: cubic-bezier(0.23, 1, 0.320, 1);"
        :style="{
          opacity:(data.rightPageStatus==0 || data.rightPageStatus==3)?1:0,
          transform:data.rightPageStatus==2?'translateY(40px)':'translateY(0px)',
          transitionDuration:(data.rightPageStatus==2)?'0s':'.3s'
        }"
      >

        <div v-if="data.rightPageId==0" style="padding-top: 60px">

          <div style="position: absolute;z-index: 1000;height: 80px;padding-top: 45px;width: calc(100% + 20px);background-color: red;transform: translateX(-10px);"
            :style="{
              top:(homeData.subPage.scrollTop + 0).toString() + 'px',
              backgroundColor:appData.theme.background,
              paddingLeft:data.leftWidth=='0'?'380px':'10px'
            }"
          >
            <span @click="()=>{
              if(homeData.showLoading)return
              if(data.rightPage.selectVolunteer.displayType=='all')return
              data.rightPage.selectVolunteer.page = 1

              data.rightPage.selectVolunteer.displayType='all';
            getVolunteer();}" :class="data.rightPage.selectVolunteer.displayType=='all'?['link-selected']:['link']">全部<span v-if="data.rightPage.selectVolunteer.totals['allLength']!=0">({{ data.rightPage.selectVolunteer.totals['allLength'] }}个)</span></span>
            <span @click="()=>{
              if(homeData.showLoading)return
              if(homeData.loginedUserInfo.isVIP==0){
                controlWarningForm(true,'提示','尊敬的考生，您尚未开通VIP服务，因此目前无法使用一键智能填报功能、查看冲稳保志愿以及查看每个志愿被录取的概率。为了获得这些高级功能，请购买VIP卡。如果你已有VIP卡，请点击下方按钮打开用户中心，输入VIP卡上的序列号以激活您的VIP服务。',()=>{
                  router.push('/user')
                },true)
                return
              }
              if(data.rightPage.selectVolunteer.displayType=='chong')return
              data.rightPage.selectVolunteer.page = 1

              data.rightPage.selectVolunteer.displayType='chong';
            getVolunteer();}" :class="data.rightPage.selectVolunteer.displayType=='chong'?['link-selected']:['link']">冲刺选<span v-if="data.rightPage.selectVolunteer.totals['chongLength']!=0">({{ data.rightPage.selectVolunteer.totals['chongLength'] }}个)</span></span>
            <span @click="()=>{
              if(homeData.showLoading)return
              if(homeData.loginedUserInfo.isVIP==0){
                controlWarningForm(true,'提示','尊敬的考生，您尚未开通VIP服务，因此目前无法使用一键智能填报功能、查看冲稳保志愿以及查看每个志愿被录取的概率。为了获得这些高级功能，请购买VIP卡。如果你已有VIP卡，请点击下方按钮打开用户中心，输入VIP卡上的序列号以激活您的VIP服务。',()=>{
router.push('/user')
                  return
                },true)
                return
              }
              if(data.rightPage.selectVolunteer.displayType=='wen')return
              data.rightPage.selectVolunteer.page = 1

              data.rightPage.selectVolunteer.displayType='wen';
            getVolunteer();}" :class="data.rightPage.selectVolunteer.displayType=='wen'?['link-selected']:['link']">稳健挑<span v-if="data.rightPage.selectVolunteer.totals['wenLength']!=0">({{ data.rightPage.selectVolunteer.totals['wenLength'] }}个)</span></span>
            <span @click="()=>{
              if(homeData.showLoading)return
              if(homeData.loginedUserInfo.isVIP==0){
                controlWarningForm(true,'提示','尊敬的考生，您尚未开通VIP服务，因此目前无法使用一键智能填报功能、查看冲稳保志愿以及查看每个志愿被录取的概率。为了获得这些高级功能，请购买VIP卡。如果你已有VIP卡，请点击下方按钮打开用户中心，输入VIP卡上的序列号以激活您的VIP服务。',()=>{
router.push('/user')
                  return
                },true)
                return
              }
              if(data.rightPage.selectVolunteer.displayType=='bao')return
              data.rightPage.selectVolunteer.page = 1

              data.rightPage.selectVolunteer.displayType='bao';
            getVolunteer();}" :class="data.rightPage.selectVolunteer.displayType=='bao'?['link-selected']:['link']">保底锁<span v-if="data.rightPage.selectVolunteer.totals['baoLength']!=0">({{ data.rightPage.selectVolunteer.totals['baoLength'] }}个)</span></span>
            <button @click="()=>{
if(homeData.showLoading)return
              getVolunteer(undefined)
            }" style="border: 0 !important;padding: 0 0;padding-left: 5px;padding-top: 5px;transform: translateY(2px)">
              <svg style="" width="18" height="18" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M29 20a1 1 0 01-1-1v-2a1 1 0 011-1h6.49c-2.53-3.627-6.732-6-11.49-6-7.732 0-14 6.268-14 14s6.268 14 14 14c6.342 0 11.699-4.217 13.42-10h4.134C39.734 36.017 32.566 42 24 42c-9.941 0-18-8.059-18-18S14.059 6 24 6c5.655 0 10.701 2.608 14.001 6.687L38 7a1 1 0 011-1h2a1 1 0 011 1v11a2 2 0 01-1.85 1.994L40 20H29z" fill="currentColor"/></svg>
              <span style="margin-left: 5px;position: relative;top: -3.5px;margin-right: 8px">刷新</span>
            </button>
          </div>

          <div>

            <p v-if="data.rightPage.selectVolunteer.items.length==0">当前类别没有可以填报的志愿</p>

            <div v-for="item in data.rightPage.selectVolunteer.items" class="item" style="width: calc(100% - 24px);width: 100%;height: auto;border-radius: 5px;margin-bottom: 20px;padding: 0 0;min-height: 150px;position: relative"
                 :style="{
                backgroundColor:appData.theme.background
            }"
            >
              <div v-if="item.sk!=false" style="color: var(--color-neutral-10);position: relative;min-height: 150px">
                <div style="width: 80px;height: 100%;border-left: 1px solid var(--color-neutral-3);display: inline-block;position: absolute;top: 0;right: 0;text-align: center;" class="subItem" @click="controlFillApplicationRightMenu(1,item)">
                  <div style="width: 100%;height: 100%;transform: translateY(50%)">
                    <span style="transform: translateY(-50%);display: inline-block;color: var(--color-neutral-10);font-size: 16px">操作</span>
                  </div>
                </div>
                <div style="width: 120px;height: 100%;border-left: 1px solid var(--color-neutral-3);display: inline-block;position: absolute;top: 0;right: 80px;padding: 10px 10px;word-break: break-all" >
                  <div v-if="item.score3!=0">
                    <p style="font-weight: bold;">{{ ((new Date).getFullYear()-3).toString() + '年' }}
                      <span v-if="homeData.loginedUserInfo.isVIP==1">
                      <span v-if="item.rate.year3>=0 && item.rate.year3<0.2" style="padding: 0px 3px;border-radius: 3px;background-color: red;color: white;font-size: 14px">险</span>
                      <span v-if="item.rate.year3>=0.2 && item.rate.year3<0.5" style="padding: 0px 3px;border-radius: 3px;background-color: darkorange;color: white;font-size: 14px">冲</span>
                      <span v-if="item.rate.year3>=0.5 && item.rate.year3<0.8" style="padding: 0px 3px;border-radius: 3px;background-color: rgb(0,120,215);color: white;font-size: 14px">稳</span>
                      <span v-if="item.rate.year3>=0.8" style="padding: 0px 3px;border-radius: 3px;background-color: green;color: white;font-size: 14px">保</span>
                    </span>
                    </p>
                    <p v-if="homeData.loginedUserInfo.isVIP==1 && !(item.rate.year3>=0 && item.rate.year3<0.2)">概率：{{ parseInt(item.rate.year3*10000)/100 }}%</p>
                    <p v-if="homeData.loginedUserInfo.isVIP==1 && item.rate.year3>=0 && item.rate.year3<0.2">概率极低</p>
                    <p>分数：{{ item.score3 }}</p>
                    <p>位次：{{ item.ranks3 }}</p>
                    <p>人数：{{ item.num3 }}</p>
                  </div>
                  <div v-if="item.score3==0">
                    <p style="font-weight: bold;color: var(--color-neutral-4)">{{ ((new Date).getFullYear()-3).toString() + '年' }}</p>
                    <p style="color: var(--color-neutral-4)">没有数据</p>
                  </div>
                </div>
                <div style="width: 120px;height: 100%;border-left: 1px solid var(--color-neutral-3);display: inline-block;position: absolute;top: 0;right: 200px;padding: 10px 10px;word-break: break-all" >
                  <div v-if="item.score2!=0">
                    <p style="font-weight: bold;">{{ ((new Date).getFullYear()-2).toString() + '年' }}
                      <span v-if="homeData.loginedUserInfo.isVIP==1">
                      <span v-if="item.rate.year2>=0 && item.rate.year2<0.2" style="padding: 0px 3px;border-radius: 3px;background-color: red;color: white;font-size: 14px">险</span>
                      <span v-if="item.rate.year2>=0.2 && item.rate.year2<0.5" style="padding: 0px 3px;border-radius: 3px;background-color: darkorange;color: white;font-size: 14px">冲</span>
                      <span v-if="item.rate.year2>=0.5 && item.rate.year2<0.8" style="padding: 0px 3px;border-radius: 3px;background-color: rgb(0,120,215);color: white;font-size: 14px">稳</span>
                      <span v-if="item.rate.year2>=0.8" style="padding: 0px 3px;border-radius: 3px;background-color: green;color: white;font-size: 14px">保</span>
                    </span>
                    </p>
                    <p v-if="homeData.loginedUserInfo.isVIP==1 && !(item.rate.year2>=0 && item.rate.year2<0.2)">概率：{{ parseInt(item.rate.year2*10000)/100 }}%</p>
                    <p v-if="homeData.loginedUserInfo.isVIP==1 && item.rate.year2>=0 && item.rate.year2<0.2">概率极低</p>
                    <p>分数：{{ item.score2 }}</p>
                    <p>位次：{{ item.ranks2 }}</p>
                    <p>人数：{{ item.num2 }}</p>
                  </div>
                  <div v-if="item.score2==0">
                    <p style="font-weight: bold;color: var(--color-neutral-4)">{{ ((new Date).getFullYear()-2).toString() + '年' }}</p>
                    <p style="color: var(--color-neutral-4)">没有数据</p>
                  </div>
                </div>
                <div style="width: 120px;height: 100%;border-left: 1px solid var(--color-neutral-3);display: inline-block;position: absolute;top: 0;right: 320px;padding: 10px 10px;word-break: break-all" >
                  <div v-if="item.score1!=0">
                    <p style="font-weight: bold;">{{ ((new Date).getFullYear()-1).toString() + '年' }}
                      <span v-if="homeData.loginedUserInfo.isVIP==1">
                      <span v-if="item.rate.year1>=0 && item.rate.year1<0.2" style="padding: 0px 3px;border-radius: 3px;background-color: red;color: white;font-size: 14px">险</span>
                      <span v-if="item.rate.year1>=0.2 && item.rate.year1<0.5" style="padding: 0px 3px;border-radius: 3px;background-color: darkorange;color: white;font-size: 14px">冲</span>
                      <span v-if="item.rate.year1>=0.5 && item.rate.year1<0.8" style="padding: 0px 3px;border-radius: 3px;background-color: rgb(0,120,215);color: white;font-size: 14px">稳</span>
                      <span v-if="item.rate.year1>=0.8" style="padding: 0px 3px;border-radius: 3px;background-color: green;color: white;font-size: 14px">保</span>
                    </span>
                    </p>
                    <p v-if="homeData.loginedUserInfo.isVIP==1 && !(item.rate.year1>=0 && item.rate.year1<0.2)">概率：{{ parseInt(item.rate.year1*10000)/100 }}%</p>
                    <p v-if="homeData.loginedUserInfo.isVIP==1 && item.rate.year1>=0 && item.rate.year1<0.2">概率极低</p>
                    <p>分数：{{ item.score1 }}</p>
                    <p>位次：{{ item.ranks1 }}</p>
                    <p>人数：{{ item.num1 }}</p>
                  </div>
                  <div v-if="item.score1==0">
                    <p style="font-weight: bold;color: var(--color-neutral-4)">{{ ((new Date).getFullYear()-1).toString() + '年' }}</p>
                    <p style="color: var(--color-neutral-4)">没有数据</p>
                  </div>
                </div>
                <div style="width: 120px;height: 100%;border-left: 1px solid var(--color-neutral-3);display: inline-block;position: absolute;top: 0;right: 440px;word-break: break-all">
                  <div v-if="homeData.loginedUserInfo.isVIP==1" style="width: 100%;height: 100%;background: linear-gradient(135deg,transparent,rgba(0,120,215,0.1));text-align: center;">
                    <p style="font-weight: bold;position: absolute;width: 100%;left: 0;top: 10px">录取概率</p>
                    <p v-if="item.rate.all>=0.2" style="line-height: 100%;font-size: 24px;display: inline-block;height: 100%;transform: translateY(50%)"><span style="transform: translateY(-50%);display: inline-block">{{ parseInt(item.rate.all*10000)/100 }}%</span></p>
                    <p v-if="item.rate.all<0.2"  style="line-height: 100%;font-size: 24px;display: inline-block;height: 100%;transform: translateY(50%)"><span style="transform: translateY(-50%);display: inline-block">概率极低</span></p>
                    <div style="display: inline-block;width: 100%;position: absolute;bottom: 10px;left: 0">
                      <span v-if="item.rate.all>=0 && item.rate.all<0.2" style="padding: 0px 3px;border-radius: 3px;background-color: red;color: white;font-size: 14px">险</span>
                      <span v-if="item.rate.all>=0.2 && item.rate.all<0.5" style="padding: 0px 3px;border-radius: 3px;background-color: darkorange;color: white;font-size: 14px">冲</span>
                      <span v-if="item.rate.all>=0.5 && item.rate.all<0.8" style="padding: 0px 3px;border-radius: 3px;background-color: rgb(0,120,215);color: white;font-size: 14px">稳</span>
                      <span v-if="item.rate.all>=0.8" style="padding: 0px 3px;border-radius: 3px;background-color: green;color: white;font-size: 14px">保</span>
                    </div>
                  </div>
                  <div v-if="homeData.loginedUserInfo.isVIP==0" style="width: 100%;height: 100%;background: linear-gradient(135deg,transparent,rgba(255,0,0,0.1));text-align: center;">
                    <p style="line-height: 100%;font-size: 14px;display: inline-block;height: 100%;transform: translateY(50%)"><span style="transform: translateY(-50%);display: inline-block;line-height: 20px">非VIP用户<br>不能查看录取概率</span></p>
                  </div>
                </div>
                <div style="width: 120px;height: 100%;border-left: 1px solid var(--color-neutral-3);display: inline-block;position: absolute;top: 0;right: 560px;padding: 10px 10px;word-break: break-all" class="subItem" @click="async ()=>{
                  controlLoading(1)
                  let re = (await tool.axiosPostWithCheckStatus(appData.serverURL,'/fillApplication/schoolInfo',{
                    universityName:item.universityName
                  })).results
                  controlLoading(0)
                  controlWarningForm(true,'即将离开当前页面','是否离开当前填志愿页面，前往搜索页面并查看' + re.universityName + '的详细介绍？',()=>{
                    localStorage.setItem('searchAutoOpen',JSON.stringify(re))
                    router.push('/search')
                  })
                }">
                  <p style="font-weight: bold;">{{ item.universityName }}</p>
                  <p v-if="item.universityCode!=''">代码：{{ item.universityCode }}</p>
                </div>
                <div style="width: calc(100% - 680px);display: inline-block;padding: 10px 10px;word-break: break-all;min-height: 120px">
                  <p style="font-weight: bold;">{{ item.majorName }}</p>
                  <p>{{ item.majorRemarks }}</p>
                  <p v-if="item.majorCode!=''">代码：{{ item.majorCode }}</p>
                  <p v-if="!(item.money=='0' || item.money=='')">学费：{{ item.money }}</p>
                  <p>选科：{{ item.claim }}</p>
                </div>
              </div>
            </div>
            
            

            <div v-if="func.getPageTotal!=undefined && func.getPageTotal(data.rightPage.selectVolunteer.totals[data.rightPage.selectVolunteer.displayType + 'Length'],data.rightPage.selectVolunteer.size)>1 && data.rightPage.selectVolunteer.getting==false" style="width: 100%;padding-right: 0px;text-align: right;">
              <button :disabled="data.rightPage.selectVolunteer.page==1 || data.rightPage.selectVolunteer.getting" @click="()=>{
          data.rightPage.selectVolunteer.page = 1
          getVolunteer()
        }">第一页</button>
              <button :disabled="data.rightPage.selectVolunteer.page==1 || data.rightPage.selectVolunteer.getting" style="margin-left: 10px;" @click="()=>{
          data.rightPage.selectVolunteer.page-=1
          getVolunteer()
        }">上一页</button>
              <a-trigger trigger="click" :unmount-on-close="false">
                <button @click="data.rightPage.selectVolunteer.warningText = ''" v-if="func.getPageTotal!=undefined" style="margin-left: 10px;">{{ data.rightPage.selectVolunteer.page.toString() + '/' + func.getPageTotal(data.rightPage.selectVolunteer.totals[data.rightPage.selectVolunteer.displayType + 'Length'],data.rightPage.selectVolunteer.size).toString() }}</button>
                <template #content>
                  <div style="padding: 10px 10px;border-radius: 10px;box-shadow: 0 1px 3px rgba(128,128,128,0.2);"
                       :style="{
                backgroundColor:appData.theme.background
              }"
                  >
                    <input v-model="data.rightPage.selectVolunteer.toPage" type="number" style="height: 35px;outline: none;background-color: rgba(0,0,0,0.1);border-radius: 5px;padding: 0 5px;width: 120px;margin-right: 10px;color: var(--color-neutral-10);" /><button :disabled="data.rightPage.selectVolunteer.getting" @click="()=>{
                data.rightPage.selectVolunteer.warningText = ''
                if(data.rightPage.selectVolunteer.toPage<1 || data.rightPage.selectVolunteer.toPage>func.getPageTotal(data.rightPage.selectVolunteer.totals[data.rightPage.selectVolunteer.displayType + 'Length'],data.rightPage.selectVolunteer.size)){
                  data.rightPage.selectVolunteer.warningText = '输入的页码不能超出页码范围'
                  return
                }
                data.rightPage.selectVolunteer.page = data.rightPage.selectVolunteer.toPage
                getVolunteer()
              }">转到</button>
                    <p v-if="data.rightPage.selectVolunteer.warningText!=''" style="color: red;margin-top: 5px;">{{ data.rightPage.selectVolunteer.warningText }}</p>
                  </div>
                </template>
              </a-trigger>
              <button :disabled="func.getPageTotal(data.rightPage.selectVolunteer.totals[data.rightPage.selectVolunteer.displayType + 'Length'],data.rightPage.selectVolunteer.size)==data.rightPage.selectVolunteer.page || data.rightPage.selectVolunteer.getting" style="margin-left: 10px;" @click="()=>{
          data.rightPage.selectVolunteer.page+=1
          getVolunteer()
        }">下一页</button>
              <button :disabled="func.getPageTotal(data.rightPage.selectVolunteer.totals[data.rightPage.selectVolunteer.displayType + 'Length'],data.rightPage.selectVolunteer.size)==data.rightPage.selectVolunteer.page || data.rightPage.selectVolunteer.getting" style="margin-left: 10px;" @click="()=>{
          data.rightPage.selectVolunteer.page = func.getPageTotal(data.rightPage.selectVolunteer.totals[data.rightPage.selectVolunteer.displayType + 'Length'],data.rightPage.selectVolunteer.size)
          getVolunteer()
        }">最后一页</button>
            </div>
            
            

          </div>

        </div>

        <div v-if="data.rightPageId==1" style="padding-top: 60px">

          <div style="position: absolute;z-index: 1000;height: 80px;padding-top: 45px;width: calc(100% + 20px);background-color: red;transform: translateX(-10px);"
               :style="{
              top:(homeData.subPage.scrollTop + 0).toString() + 'px',
              backgroundColor:appData.theme.background,
              paddingLeft:data.leftWidth=='0'?'380px':'10px'
            }"
          >
            <span v-if="data.applicationForm.currentFormName!=''" @click="()=>{

            }" :class="['link']">{{ data.applicationForm.currentFormName + '(' + data.rightPage.applicationForm.list.length.toString() + '个志愿)' }}</span>

            <button v-if="data.applicationForm.currentFormName!=''" @click="async ()=>{
              controlWarningForm(1,'提示','此操作不可恢复，是否继续？',async ()=>{
                controlLoading(1)
                await tool.axiosPostWithCheckStatus(config.serverURL,'/applicationForm/delete',{
                  token:homeData.token,
                  userMark:homeData.loginedUserInfo.mark,
                  formName:data.applicationForm.currentFormName
                })
                await getApplicationFormNameList()
                data.applicationForm.currentFormName = ''
                data.rightPage.applicationForm.list = undefined
                controlLoading(0)
              },true)
            }" style="border: 0 !important;padding: 0 0;padding-left: 5px;padding-top: 5px;transform: translateY(2px)">
              <svg width="18" height="18" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M23.886 20.957L37.32 7.522a1 1 0 011.414 0l1.414 1.414a1 1 0 010 1.415L26.714 23.786 40.149 37.22a1 1 0 010 1.414l-1.414 1.414a1 1 0 01-1.414 0L23.886 26.614 10.45 40.049a1 1 0 01-1.415 0l-1.414-1.414a1 1 0 010-1.414l13.435-13.435L7.622 10.35a1 1 0 010-1.415l1.414-1.414a1 1 0 011.415 0l13.435 13.435z" fill="currentColor"/></svg>
              <span style="margin-left: 5px;position: relative;top: -3.5px;margin-right: 8px">删除</span>
            </button>

            <button v-if="data.applicationForm.currentFormName!=''" @click="async ()=>{
                controlLoading(1)
                window.open(config.serverURL + '/applicationForm/export/' + homeData.token + '/' + homeData.loginedUserInfo.mark + '/' + data.applicationForm.currentFormName,'_blank')
                controlLoading(0)
            }" style="border: 0 !important;padding: 0 0;padding-left: 5px;padding-top: 5px;transform: translateY(2px)">
              <svg width="18" height="18" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M31 4a1 1 0 011 1v2a1 1 0 01-1 1H8v32h23a1 1 0 011 1v2a1 1 0 01-1 1H6a2 2 0 01-2-2V6a2 2 0 012-2h25zm4.846 10.658l7.778 7.778a2 2 0 010 2.828l-7.778 7.778a1 1 0 01-1.415 0l-1.414-1.414a1 1 0 010-1.414l4.235-4.235-18.206-.08a1 1 0 01-.996-.996l-.008-1.894a1 1 0 01.88-.997l.125-.007 18.572.082-4.602-4.601a1 1 0 010-1.414l1.414-1.414a1 1 0 011.415 0z" fill="currentColor"/></svg>
              <span style="margin-left: 5px;position: relative;top: -3.5px;margin-right: 8px">导出</span>
            </button>

            <button v-if="data.applicationForm.currentFormName!=''" @click="async ()=>{
                controlLoading(1)
                await getApplicationFormItems(data.applicationForm.currentFormName)
                controlLoading(0)
            }" style="border: 0 !important;padding: 0 0;padding-left: 5px;padding-top: 5px;transform: translateY(2px)">
              <svg width="18" height="18" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M29 20a1 1 0 01-1-1v-2a1 1 0 011-1h6.49c-2.53-3.627-6.732-6-11.49-6-7.732 0-14 6.268-14 14s6.268 14 14 14c6.342 0 11.699-4.217 13.42-10h4.134C39.734 36.017 32.566 42 24 42c-9.941 0-18-8.059-18-18S14.059 6 24 6c5.655 0 10.701 2.608 14.001 6.687L38 7a1 1 0 011-1h2a1 1 0 011 1v11a2 2 0 01-1.85 1.994L40 20H29z" fill="currentColor"/></svg>
              <span style="margin-left: 5px;position: relative;top: -3.5px;margin-right: 8px">刷新</span>
            </button>

            <button v-if="data.applicationForm.currentFormName!=''" @click="async ()=>{
                controlForward(true,6,JSON.stringify({
                  userMark:homeData.loginedUserInfo.mark,
                  name:data.applicationForm.currentFormName
                }))
            }" style="border: 0 !important;padding: 0 0;padding-left: 5px;padding-top: 5px;transform: translateY(2px)">
              <svg width="18" height="18" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M25 15.37c-12.15 0-22 9.992-22 22.318 0 .766.083 1.795.248 3.088a.5.5 0 00.92.202l.317-.496c.304-.467.57-.847.798-1.14 3.586-4.616 9.448-7.225 17.17-7.331L25 32.007v8.975c0 .562.46 1.018 1.029 1.018.273 0 .534-.107.727-.298L43.548 25.08a1.517 1.517 0 000-2.16L26.756 6.298a1.036 1.036 0 00-1.455 0c-.193.191-.301.45-.301.72v8.352zm0 4h4v-5.222L38.953 24 29 33.852v-5.845h-6.052c-5.805 0-10.882 1.263-14.972 3.713C10.41 24.529 17.12 19.37 25 19.37z" fill="currentColor"/></svg>
              <span style="margin-left: 5px;position: relative;top: -3.5px;margin-right: 8px">转发</span>
            </button>

          </div>

          <div v-if="data.rightPage.applicationForm.list!=undefined">
            <p v-if="data.rightPage.applicationForm.list.length==0">此志愿表为空</p>
            <div style="border-radius: 5px;box-shadow: 0 1px 3px rgba(0,0,0,0.1);border: 1px solid var(--color-neutral-3);width: 100%;transition: height .1s">
              <div v-for="item in data.rightPage.applicationForm.list" style="border-bottom: 1px solid var(--color-neutral-3)">
                <div v-if="item.fold==undefined" style="width: 100%;position: relative;padding: 10px 10px">
                  <div style="display: inline-block;width: calc(50% - 20px);height: 100%;">
                    <p style="font-weight: bold">{{ (item.index==undefined?'':item.index.toString()) + ' ' + item.majorName }}</p>
                    <p>{{ item.majorRemarks }}</p>
                  </div>
                  <div style="display: inline-block;width: calc(50% - 20px);height: 100%;position: absolute;top: 0;right: 40px;transform: translateY(50%);padding-left: 5px">
                    <p style="transform: translateY(-50%)">{{ item.universityName }}</p>
                  </div>
                  <div style="width: 40px;height: 100%;display: inline-block;position: absolute;top: 0;right: 0">
                      <div style="width: 100%;height: 100%;text-align: center;transform: translateY(50%)">
                        <button @click="item.fold = false" style="transform: translateY(-50%);border: 0 !important;padding: 0 0">详情</button>
                      </div>
                  </div>
                </div>
                <div v-if="item.fold==false" style="width: calc(100% - 24px);width: 100%;height: auto;border-radius: 5px;padding: 0 0;min-height: 150px;position: relative"
                     :style="{
                backgroundColor:appData.theme.background
            }"
                >
                  <div v-if="item.sk!=false" style="color: var(--color-neutral-10);position: relative;min-height: 150px">
                    <div style="width: 80px;height: 100%;border-left: 1px solid var(--color-neutral-3);display: inline-block;position: absolute;top: 0;right: 0;text-align: center;">
                      <div style="width: 100%;height: 100%;transform: translateY(50%)">
                        <div style="transform: translateY(-50%);display: inline-block;color: var(--color-neutral-10);font-size: 16px">
                          <button style="border: 0px !important" @click="item.fold = undefined">简略</button>
                          <button v-if="data.rightPage.applicationForm.list.length!=1" style="border: 0px !important" @click="async ()=>{
                            controlLoading(1)
                            await tool.axiosPostWithCheckStatus(config.serverURL,'/applicationForm/delete',{
                              token:homeData.token,
                              userMark:homeData.loginedUserInfo.mark,
                              formName:data.applicationForm.currentFormName,
                              itemMark:item.mark
                            })
                            let re = await tool.axiosPostWithCheckStatus(config.serverURL,'/applicationForm/list',{
                              token:homeData.token,
                              userMark:homeData.loginedUserInfo.mark,
                              formName:data.applicationForm.currentFormName
                            })
                            data.rightPage.applicationForm.list = re.results
                            controlLoading(0)
                          }">删除</button>
                          <button style="border: 0px !important" @click="controlFillApplicationRightMenu(true,item,true)">移动</button>
                        </div>
                      </div>
                    </div>
                    <div style="width: 120px;height: 100%;border-left: 1px solid var(--color-neutral-3);display: inline-block;position: absolute;top: 0;right: 80px;padding: 10px 10px;word-break: break-all" >
                      <div v-if="item.score3!=0">
                        <p style="font-weight: bold;">{{ ((new Date).getFullYear()-3).toString() + '年' }}

                        </p>
                        <p>分数：{{ item.score3 }}</p>
                        <p>位次：{{ item.ranks3 }}</p>
                        <p>人数：{{ item.num3 }}</p>
                      </div>
                      <div v-if="item.score3==0">
                        <p style="font-weight: bold;color: var(--color-neutral-4)">{{ ((new Date).getFullYear()-3).toString() + '年' }}</p>
                        <p style="color: var(--color-neutral-4)">没有数据</p>
                      </div>
                    </div>
                    <div style="width: 120px;height: 100%;border-left: 1px solid var(--color-neutral-3);display: inline-block;position: absolute;top: 0;right: 200px;padding: 10px 10px;word-break: break-all" >
                      <div v-if="item.score2!=0">
                        <p style="font-weight: bold;">{{ ((new Date).getFullYear()-2).toString() + '年' }}

                        </p>

                        <p>分数：{{ item.score2 }}</p>
                        <p>位次：{{ item.ranks2 }}</p>
                        <p>人数：{{ item.num2 }}</p>
                      </div>
                      <div v-if="item.score2==0">
                        <p style="font-weight: bold;color: var(--color-neutral-4)">{{ ((new Date).getFullYear()-2).toString() + '年' }}</p>
                        <p style="color: var(--color-neutral-4)">没有数据</p>
                      </div>
                    </div>
                    <div style="width: 120px;height: 100%;border-left: 1px solid var(--color-neutral-3);display: inline-block;position: absolute;top: 0;right: 320px;padding: 10px 10px;word-break: break-all" >
                      <div v-if="item.score1!=0">
                        <p style="font-weight: bold;">{{ ((new Date).getFullYear()-1).toString() + '年' }}

                        </p>

                        <p>分数：{{ item.score1 }}</p>
                        <p>位次：{{ item.ranks1 }}</p>
                        <p>人数：{{ item.num1 }}</p>
                      </div>
                      <div v-if="item.score1==0">
                        <p style="font-weight: bold;color: var(--color-neutral-4)">{{ ((new Date).getFullYear()-1).toString() + '年' }}</p>
                        <p style="color: var(--color-neutral-4);">没有数据</p>
                      </div>
                    </div>
                    <div style="width: 120px;height: 100%;border-left: 1px solid var(--color-neutral-3);display: inline-block;position: absolute;top: 0;right: 440px;padding: 10px 10px;word-break: break-all" class="subItem" @click="async ()=>{
                  controlLoading(1)
                  let re = (await tool.axiosPostWithCheckStatus(appData.serverURL,'/fillApplication/schoolInfo',{
                    universityName:item.universityName
                  })).results
                  controlLoading(0)
                  controlWarningForm(true,'即将离开当前页面','是否离开当前填志愿页面，前往搜索页面并查看' + re.universityName + '的详细介绍？',()=>{
                    localStorage.setItem('searchAutoOpen',JSON.stringify(re))
                    router.push('/search')
                  })
                }">
                      <p style="font-weight: bold;">{{ item.universityName }}</p>
                      <p v-if="item.universityCode!=''">代码：{{ item.universityCode }}</p>
                    </div>
                    <div style="width: calc(100% - 560px);display: inline-block;padding: 10px 10px;word-break: break-all;min-height: 120px">
                      <p style="font-weight: bold;">{{ item.index.toString() + ' ' + item.majorName }}</p>
                      <p>{{ item.majorRemarks }}</p>
                      <p v-if="item.majorCode!=''">代码：{{ item.majorCode }}</p>
                      <p v-if="!(item.money=='0' || item.money=='')">学费：{{ item.money }}</p>
                      <p>选科：{{ item.claim }}</p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>

          <p v-if="data.rightPage.applicationForm.list==undefined" style="cursor: pointer;" @click="data.leftFold = false">请选择一个志愿表</p>

        </div>

      </div>

    </div>

    <div class="form-bg" id="warningForm">
      <div class="form">
        <div class="form-title">
          <span style="font-size: 18px;font-weight: bold">{{ data.warningForm.title }}</span>
          <svg v-if="data.warningForm.showCancel" @click="controlWarningForm(false)" style="position: absolute;right: 0;top: 1.5px;cursor: pointer;" width="24" height="24" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M23.886 20.957L37.32 7.522a1 1 0 011.414 0l1.414 1.414a1 1 0 010 1.415L26.714 23.786 40.149 37.22a1 1 0 010 1.414l-1.414 1.414a1 1 0 01-1.414 0L23.886 26.614 10.45 40.049a1 1 0 01-1.415 0l-1.414-1.414a1 1 0 010-1.414l13.435-13.435L7.622 10.35a1 1 0 010-1.415l1.414-1.414a1 1 0 011.415 0l13.435 13.435z" fill="currentColor"/></svg>
        </div>
        <div class="form-content">
          <p>{{data.warningForm.content}}</p>
          <input placeholder="请输入序列号" v-if="data.warningForm.showInput==true" style="padding: 3px 3px;border-radius: 3px;background-color: var(--color-neutral-2);font-size: 14px;color: var(--color-neutral-10);margin-top: 10px;width: 100%;" v-model="data.warningForm.input" />
        </div>
        <div class="form-footer">
          <button v-if="data.warningForm.showCancel" @click="controlWarningForm(false)" style="margin-right: 10px">取消</button>
          <button @click="()=>{
            controlWarningForm(false)
            data.warningForm.okCallBack()
          }">确定</button>
        </div>
      </div>
    </div>

    <div class="form-bg" id="fillApplicatonRightMenu" style="padding: 0 0;background-color: transparent;">
      <div style="width: 100%;height: 100%;position: absolute" @mousedown="controlFillApplicationRightMenu(0)">

      </div>
      <div id="rightMenuBg" v-if="data.applicationForm.list!=undefined" style="border-radius: 5px;box-shadow: 0 4px 10px rgba(0,0,0,0.3);background-color: var(--color-neutral-1);position: absolute;color: var(--color-neutral-10);width: 150px;border: 1px solid var(--color-neutral-3);backdrop-filter: blur(10px)"
        :style="{
          left:data.rightMenu.left.toString() + 'px',
          top:data.rightMenu.top.toString() + 'px',
          background:appData.theme.translucentBackground
        }"
      >
        <div v-if="data.applicationForm.list.length!=0 && data.rightMenu.applicationFormMenu==false" style="margin-bottom: 10px;padding: 10px 10px">
          <p style="font-weight: bold;margin-bottom: 5px">选择志愿表</p>
          <div style="width: 100%;max-height: 200px;overflow-y: auto">
            <button v-for="item in data.applicationForm.list" style="border: 0 !important;width: 100%;text-align: left;padding-left: 5px" @click="async ()=>{
              controlLoading(1)
              data.rightMenu.warningText2 = ''
              let re = await tool.axiosPostWithCheckStatus(config.serverURL,'/applicationForm/add',{
                token:homeData.token,
                userMark:homeData.loginedUserInfo.mark,
                itemMark:data.rightMenu.item.mark,
                formName:item.name
              })
              if(re.status==0){
                data.rightMenu.warningText2 = re.content
                controlLoading(0)
                return
              }
              if(data.applicationForm.currentFormName==item.name){
                getApplicationFormItems(item.name)
              }
              getApplicationFormNameList()
              controlLoading(0)
              controlFillApplicationRightMenu(0)
            }">{{ item.name }}</button>
          </div>
          <p v-if="data.rightMenu.warningText2!=''" style="color: red;font-size: 14px">{{ data.rightMenu.warningText2 }}</p>
        </div>

        <div v-if="data.rightMenu.applicationFormMenu==false" style="margin-top: 0px;padding: 10px 10px;border-top: 1px solid var(--color-neutral-3)">
          <p style="font-weight: bold">新建志愿表并填报</p>
          <input :style="{background:appData.theme.background}" v-model="data.rightMenu.input" placeholder="新志愿表名称" type="text" style="width: 100%;margin-top: 5px;border-radius: 3px;font-size: 14px;color: var(--color-neutral-10);padding-left: 5px;padding-right: 5px" />
          <p v-if="data.rightMenu.warningText!=''" style="color: red;font-size: 14px">{{ data.rightMenu.warningText }}</p>
          <div style="text-align: right;margin-top: 5px">
            <button style="margin-right: 5px;padding: 2px 5px;border: 0 !important" @click="()=>{
              controlFillApplicationRightMenu(false)
            }">取消</button>
            <button style="padding: 2px 5px;border: 0 !important" @click="async ()=>{
              data.rightMenu.warningText = ''
              controlLoading(1)
              if(data.rightMenu.input==''){
                data.rightMenu.warningText = '新志愿表名称不能为空'
                controlLoading(0)
                return
              }
              let re = await tool.axiosPostWithCheckStatus(config.serverURL,'/applicationForm/add',{
                token:homeData.token,
                userMark:homeData.loginedUserInfo.mark,
                itemMark:data.rightMenu.item.mark,
                formName:data.rightMenu.input,
                newForm:true
              })
              if(re.status==0){
                data.rightMenu.warningText = re.content
                controlLoading(0)
                return
              }
              controlFillApplicationRightMenu(false)
              controlLoading(0)
              getApplicationFormNameList()
            }">新建</button>
          </div>
        </div>

        <div v-if="data.rightMenu.applicationFormMenu" style="margin-top: 0px;padding: 10px 10px;">
          <button v-if="data.rightMenu.item.index!=1" style="border: 0 !important;width: 100%;text-align: left;padding-left: 5px" @click="async ()=>{
              controlLoading(1)
              await tool.axiosPostWithCheckStatus(config.serverURL,'/applicationForm/move',{
                token:homeData.token,
                userMark:homeData.loginedUserInfo.mark,
                formName:data.applicationForm.currentFormName,
                index:data.rightMenu.item.index,
                op:true
              })
              controlLoading(0)
              controlFillApplicationRightMenu(0)
              await getApplicationFormItems(data.applicationForm.currentFormName)
            }">上移</button>
          <button v-if="data.rightMenu.item.index!=data.rightPage.applicationForm.list.length" style="border: 0 !important;width: 100%;text-align: left;padding-left: 5px" @click="async ()=>{
              controlLoading(1)
              await tool.axiosPostWithCheckStatus(config.serverURL,'/applicationForm/move',{
                token:homeData.token,
                userMark:homeData.loginedUserInfo.mark,
                formName:data.applicationForm.currentFormName,
                index:data.rightMenu.item.index,
                op:false
              })
              controlLoading(0)
              controlFillApplicationRightMenu(0)
              await getApplicationFormItems(data.applicationForm.currentFormName)
            }">下移</button>
          <p style="font-weight: bold">输入序号并移动</p>
          <input :style="{background:appData.theme.background}" v-model="data.rightMenu.inputIndex" placeholder="移动到序号" type="number" style="width: calc(100% - 45px);margin-top: 5px;border-radius: 3px;font-size: 14px;color: var(--color-neutral-10);padding-left: 5px;padding-right: 5px;margin-right: 10px" /><button @click="async ()=>{
            data.rightMenu.warningText = ''
            if(data.rightMenu.inputIndex==undefined || data.rightMenu.inputIndex=='' || data.rightMenu.inputIndex<1 || data.rightMenu.inputIndex>data.rightPage.applicationForm.list.length){
              data.rightMenu.warningText = '请输入正确的序号'
              return
            }
            controlFillApplicationRightMenu(0)
            controlLoading(1)
            await tool.axiosPostWithCheckStatus(config.serverURL,'/applicationForm/moveByIndex',{
              token:homeData.token,
              userMark:homeData.loginedUserInfo.mark,
              itemMark:data.rightMenu.item.mark,
              fromIndex:data.rightMenu.item.index,
              index:data.rightMenu.inputIndex,
              formName:data.applicationForm.currentFormName
            })
            controlLoading(0)
            getApplicationFormItems(data.applicationForm.currentFormName)
          }" style="padding: 3px 3px;border: 0 !important">移动</button>
          <p v-if="data.rightMenu.warningText!=''" style="color: red;font-size: 14px">{{ data.rightMenu.warningText }}</p>
        </div>

        <div style="padding: 10px 10px;padding-top: 0">
          <button style="border: 0 !important;width: 100%;text-align: left;padding-left: 5px" @click="async ()=>{
              controlForward(true,5,data.rightMenu.item.mark)
              controlFillApplicationRightMenu(0)
            }">转发</button>
        </div>


      </div>

    </div>

  </div>
</template>

<script>
import tool from "@/utlis/tool"
import config from "@/config"
import router from "@/router";

export default{
  computed:{
    tool(){
      return tool
    },
    router(){
      return router
    },
    localStorage(){
      return localStorage
    },
    config(){
      return config
    },
    window(){
      return window
    }
  },
  data(){
    return{
      data:{
        leftStatus:0,
        leftFold:true,
        leftWidth:'400px',
        leftPageId:0,
        rightPageId:0,
        rightPageStatus:1,
        rightPage:{
          selectVolunteer:{
            displayType:'all',
            getting:false,
            items:[],
            itemsM:[{sk:false},{sk:false},{sk:false},{sk:false},{sk:false},{sk:false},{sk:false},{sk:false},{sk:false},{sk:false}],
            page:1,
            size:10,
            total:0,
            totals:{
              chongLength:0,
              wenLength:0,
              baoLength:0,
              allLength:0
            },
            toPage:0,
          },
          applicationForm:{
            list:undefined
          }
        },
        searching:false,
        formData:{
          provinces:[],
        },
        form:{
          universityName:'',
          majorName:[],
          inputMajorName:'',
          provinces:[],
          majorRemarks:'不限',
          batch:'本科',
          moneyMax:0,
          scoreDown:30,
          scoreUp:20,
          characteristic:[false,false,false,false]
        },
        warningForm:{
          title:'',
          content:'',
          cancelText:'取消',
          okText:'确定',
          showCancel:true,
          okCallBack:()=>{},
          input:'',
          showInput:false,
        },
        rightMenu:{
          item:undefined,
          top:0,
          left:0,
          input:'',
          warningText:'',
          warningText2:'',
          cHeight:0,
          applicationFormMenu:false,
          inputIndex:1,
        },
        applicationForm:{
          list:undefined,
          currentFormName:''
        },
        notification:{
          status:0,
          percentage:0
        }
      },
      func:{
        getPageTotal:()=>{}
      }
    }
  },
  async mounted(){
    this.func.getPageTotal = tool.getPageTotal
    if(this.homeData.loginedUserInfo==undefined){
      router.push('/')
      return
    }
    this.changeRightPage(0)
    if(localStorage.getItem('fillApplicationAutoSearch')!=null){
      let re = JSON.parse(localStorage.getItem('fillApplicationAutoSearch'))
      this.data.form.universityName = re.universityName
      this.data.form.majorName.push(re.majorName)
      localStorage.removeItem('fillApplicationAutoSearch')
    }
    await this.prepareData()
    await this.getApplicationFormNameList()
    if(localStorage.getItem('fillApplicationShowApplicationForm')!=null){
      let re = localStorage.getItem('fillApplicationShowApplicationForm')
      this.getApplicationFormItems(re)
      this.changeRightPage(1)
      this.data.leftPageId = 1
      localStorage.removeItem('fillApplicationShowApplicationForm')
    }
    this.getVolunteer()

    setInterval(()=>{
      if(this.appData.pageSize.width<1430){
        this.data.leftWidth = '0'
      }else{
        this.data.leftWidth = '400px'
      }

      try {
        this.data.rightMenu.cHeight = document.getElementById('rightMenuBg').clientHeight
      }catch(e){

      }

    })
  },
  methods:{
    async getApplicationFormItems(formName){
      this.controlLoading(true)
      this.data.rightPage.applicationForm.list = (await tool.axiosPostWithCheckStatus(config.serverURL,'/applicationForm/list',{
        token:this.homeData.token,
        userMark:this.homeData.loginedUserInfo.mark,
        formName:formName
      })).results
      this.data.applicationForm.currentFormName = formName
      this.controlLoading(false)
    },
    characteristicChanged(){
      let string = ''
      for(let i=0;i<this.data.form.characteristic.length;i++){
        if(this.data.form.characteristic[i]==true){
          if(string!=''){
            string+='、'
          }
          switch (i) {
            case 0:
              string+='985'
              break
            case 1:
              string+='211'
              break
            case 2:
              string+='双一流'
              break
            case 3:
              string+='强基计划'
              break
          }
        }
      }
      if(string.length==0){
        return '无限制'
      }else{
        return string
      }
    },
    async getApplicationFormNameList(){
      this.controlLoading(1)
      let re = (await tool.axiosPostWithCheckStatus(config.serverURL,'/applicationForm/formsList',{
        token:this.homeData.token,
        userMark:this.homeData.loginedUserInfo.mark
      })).results
      this.data.applicationForm.list = re
      this.controlLoading(0)
    },
    controlFillApplicationRightMenu(show,item,afm=false){
      this.data.rightMenu.applicationFormMenu = afm
      if(show){
        this.data.rightMenu.input = ''
        this.data.rightMenu.warningText = ''
        this.data.rightMenu.warningText2 = ''
        this.data.rightMenu.top = this.appData.mousePosition.y
        this.data.rightMenu.left = this.appData.mousePosition.x - 150
        this.data.rightMenu.item = item
        let re = document.getElementsByClassName('form-bg')
        for(let i=0;i<re.length;i++){
          if(re[i].id=='fillApplicatonRightMenu'){
            re[i].style.display = 'inline-block'
            setTimeout(()=>{
              if(this.data.rightMenu.top+this.data.rightMenu.cHeight>this.appData.pageSize.height){
                this.data.rightMenu.top = this.appData.pageSize.height - this.data.rightMenu.cHeight
              }
            },1)
            return
          }
        }
      }else{
        let re = document.getElementsByClassName('form-bg')
        for(let i=0;i<re.length;i++){
          if(re[i].id=='fillApplicatonRightMenu'){
            re[i].style.display = 'none'
            return
          }
        }
      }
    },
    controlWarningForm(show,title,content,okCallBack = ()=>{},showCancel = true,cancelText = '取消',okText = '确定',showInput = false){
      if(show){
        this.data.warningForm.title = title
        this.data.warningForm.content = content
        this.data.warningForm.cancelText = cancelText
        this.data.warningForm.okText = okText
        this.data.warningForm.okCallBack = okCallBack
        this.data.warningForm.showCancel = showCancel
        this.data.warningForm.showInput = showInput
        this.data.warningForm.input = ''
        let re = document.getElementsByClassName('form-bg')
        for(let i=0;i<re.length;i++){
          if(re[i].id=='warningForm'){
            re[i].style.display = 'inline-block'
            return
          }
        }
      }else{
        let re = document.getElementsByClassName('form-bg')
        for(let i=0;i<re.length;i++){
          if(re[i].id=='warningForm'){
            re[i].style.display = 'none'
            return
          }
        }
      }
    },
    async getVolunteer(isFill=undefined){
      this.data.rightPage.selectVolunteer.getting = true
      this.controlLoading(1)
      if(isFill==undefined){
        this.data.rightPage.selectVolunteer.items = JSON.parse(JSON.stringify(this.data.rightPage.selectVolunteer.itemsM))
      }
      let sendData = {
        form:this.data.form,
        province:this.homeData.loginedUserInfo.province,
        token:this.homeData.token,
        page:this.data.rightPage.selectVolunteer.page,
        size:this.data.rightPage.selectVolunteer.size,
        type:this.data.rightPage.selectVolunteer.displayType,
        userMark:this.homeData.loginedUserInfo.mark,
        isFill:isFill
      }
      if(this.homeData.loginedUserInfo!=undefined){
        sendData.form.subjectType = this.homeData.loginedUserInfo.subjectType
        sendData.form.subjects = this.homeData.loginedUserInfo.subjects
        sendData.form.ranks = this.homeData.loginedUserInfo.ranks
      }
      let re = await tool.axiosPostWithCheckStatus(config.serverURL,'/fillApplication/get',sendData)
      if(isFill==undefined){
        this.data.rightPage.selectVolunteer.items = JSON.parse(JSON.stringify(re.results.results))
        delete re.results.results
        this.data.rightPage.selectVolunteer.totals = re.results
      }else{
        this.getApplicationFormNameList()
      }
      this.rsps()
      this.controlLoading(0)
      this.data.rightPage.selectVolunteer.getting = false
    },
    async changeRightPage(id){
      this.data.rightPageStatus = 1
      await tool.waitSeconds(0.3)
      this.data.rightPageId = id
      this.data.rightPageStatus = 2
      await tool.waitSeconds(0.001)
      this.data.rightPageStatus = 3
    },
    async prepareData(){
      let re = (await tool.axiosPostWithCheckStatus(config.serverURL,'/provincesAndSubjects',{})).results
      let re0 = []
      for(let i=0;i<re.length;i++){
        re0.push(re[i].name)
      }
      this.data.formData.provinces = re0
    }
  },
  props:{
    appData: undefined,
    homeData: undefined,
    controlLoading: undefined,
    ctrlCharm:undefined,
    ctrlForm:undefined,
    rsps:undefined,
    controlForward:undefined
  },
}
</script>

<style scoped>

.form-content{
  padding-top: 10px;
  color: var(--color-neutral-10);
  padding-bottom: 20px;
}

.form-footer{
  padding-top: 10px;
  text-align: right;
}

.form-title{
  position: relative;
  width: 100%;
  color: var(--color-neutral-10);
  min-height: 24px;
}

.form-bg{
  width: calc(100vw - 70px);
  height: 100vh;
  background-color: rgba(0,0,0,0.2);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 2000;
  padding-left: calc(50vw - 35px);
  padding-top: 50vh;
  display: none;
}

.form{
  transform: translate(-50%,-50%);
  padding: 20px 20px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  position: relative;
  min-width: 500px;
  display: inline-block;
  background-color: var(--color-neutral-1);
}

.subItem:hover{
  background-color: var(--color-neutral-2);
}

.item-wrapper{
  opacity: 0;
  display: inline-block;
}

.item{
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  padding: 12px 16px;
  position: relative;
  color: var(--color-neutral-10);
  border: 1px solid var(--color-neutral-3);
  background-color: var(--color-neutral-1);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.link{
  font-size: 18px;
  color: var(--color-neutral-10);
  margin-right: 10px;
}

.link:hover{
  color: var(--color-neutral-8);
}

.link:active{
  color: var(--color-neutral-9);
}

.link-selected{
  font-size: 18px;
  color: var(--color-neutral-10);
  font-weight: bold;
  border-bottom: 3px solid rgb(0,120,215);
  margin-right: 10px;
}

.link-selected:hover{
  color: var(--color-neutral-8);
}

.link-selected:active{
  color: var(--color-neutral-9);
}

</style>